import { Controller, Get, Query, UseGuards, Render } from '@nestjs/common';
import { JwtHttpGuard } from '../auth/jwt-http.guard';

@Controller()
export class ArticleEditorController {
  @UseGuards(JwtHttpGuard)
  @Get('article/editor')
  @Render('article-editor.html')
  getArticleEditorPage(@Query('id') id?: string) {
    return {
      articleId: id || null
    };
  }
}